//
//  MessageButton.m
//  Shengzhuli
//
//  Created by 卡忙科技 on 16/7/20.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#import "MessageButton.h"

@implementation MessageButton

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        UIImageView *dotImageView = [[UIImageView alloc]init];
        dotImageView.image = [UIImage imageNamed:@"hongdian"];
        self.dotImageView = dotImageView;
        [self addSubview:dotImageView];
    }
    return self;
}
- (void)setIsHiddenImage:(BOOL)isHiddenImage
{
    _isHiddenImage = isHiddenImage;
    self.dotImageView.hidden = isHiddenImage;
    
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    CGSize size = self.frame.size;
    self.titleLabel.frame = CGRectMake(0, 0, 32, size.height);
    self.dotImageView.frame = CGRectMake(CGRectGetMaxX(self.titleLabel.frame), 3, 15, 15);
}
@end
